package org.zezs.sync.mongo.config.sync.metadata;

import java.util.ArrayList;
import java.util.List;

public class SyncEnt {

    //插件
    private String[] plugs;
    //同步任务名称，日志线程名称
    private String name;
    //数据源mongo名称
    private String source;
    //集合名称，正则表达式配置  如 webServiceLog2018[0-9]{2} 可以表示 webServiceLog201801，webServiceLog201802
    private String collection;
    //管道一个数据可以同步到多个管道
    private List<Chains> chains;
    //mongo查询过滤条件，目前只支持字符串
    private List<Where> where = new ArrayList<>();
    //每次获取多少数据批量处理
    private int limit;
    //如果是false代表不同步
    private boolean use = true;

    public void setSource(String source) {
        this.source = source;
    }

    public String getSource() {
        return source;
    }

    public void setCollection(String collection) {
        this.collection = collection;
    }

    public String getCollection() {
        return collection;
    }

    public void setChains(List<Chains> chains) {
        this.chains = chains;
    }

    public List<Chains> getChains() {
        return chains;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public int getLimit() {
        return limit;
    }

    public boolean isUse() {
        return use;
    }

    public void setUse(boolean use) {
        this.use = use;
    }

    public List<Where> getWhere() {
        return where;
    }

    public void setWhere(List<Where> where) {
        this.where = where;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String[] getPlugs() {
        return plugs;
    }

    public void setPlugs(String[] plugs) {
        this.plugs = plugs;
    }
}